#include"method.h"
#include"GenericMethod.cpp"
#include<iostream>
using namespace std;
int main()
{
	//char p[] ="abcccdddde";
	////char p[]={'a','b','b','b','c','d'};
	//Del_duplicated(p, sizeof(p));
	//cout<<p<<endl;

	//char p[] ="abcccdddde";
	//RemoveDuplicatedChar(p);
	//cout<<p<<endl;

	//char *pStr1 = "";
	//char *pStr2 = "bac";
	//cout<<IsAnagram(pStr1, pStr2)<<endl;

	//int arr1[] = {1,2,3,4,5};
	//int arr2[] = {3,2,1,4,5};
	//cout<<IsPopOrder(arr1,arr2, 5)<<endl;

	//char p[]={'a','b','c','d'};
	//Perm<char>(p, 4, 4);

	//int a[]={1,2,3,4,5,8,9,11,23,2,4,5,6,7};
	// GetValueSubSet(a, 0, sizeof(a)/sizeof(int),15);

	//char *pSourceStr = "gabcdef";
	//char *pTem = "abc";
	//cout<<Index(pSourceStr, pTem)<<endl;

	char *pSourceStr = "gabcdef";
	char *pTem = "abc";
	int next[40];
	Get_next(pTem, next);
	cout<<KMP_Index(pSourceStr, pTem, 0, next)<<endl;

	//char *pSourceStr = "gabcdef";
	//char *pTem = "abc";
	//cout<<StrStr_Impl(pSourceStr, pTem)<<endl;

	//char arr[] = "123abcde/0123456789:;";
	//char arr1[18];
	//MaxNumStr(arr, arr1);
	//cout<<arr1<<endl;


	cin.get();
	return 0;

}